<style>
@import '/pages/patient/index.css';
</style>
<template>
	<view class="patient-container">
		<!-- 顶部导航栏 -->
		<view class="nav-bar">
			<view class="user-info">
				<image class="avatar" src="/static/avatar-default.png"></image>
				<text class="welcome">欢迎回来，患者</text>
			</view>
			<view class="search-box">
				<input type="text" placeholder="输入搜索的关键词" />
			</view>
		</view>

		<!-- 主要功能区 -->
		<scroll-view scroll-y class="main-content">
			<!-- 人生回顾模块 -->
			<view class="module-section">
				<view class="module-header">
					<text class="module-title">人生回顾</text>
					<text class="module-more">更多 ></text>
				</view>
				<view class="function-cards">
					<view class="function-card" @click="navigateTo('/pages/patient/personalStory')">
						<image class="card-image" src="/static/avatar-default.png"></image>
						<text class="card-title">个人故事</text>
					</view>
					<view class="function-card" @click="navigateTo('/pages/patient/storyEdit')">
						<image class="card-image" src="/static/avatar-default.png"></image>
						<text class="card-title">故事编辑</text>
					</view>
				</view>
			</view>

			<!-- 记忆收集模块 -->
			<view class="module-section">
				<view class="module-header">
					<text class="module-title">记忆收集</text>
					<text class="module-more">更多 ></text>
				</view>
				<view class="function-cards">
					<view class="function-card" @click="navigateTo('/pages/patient/storyCollection')">
						<image class="card-image" src="/static/avatar-default.png"></image>
						<text class="card-title">故事收集</text>
					</view>
					<view class="function-card" @click="navigateTo('/pages/patient/importantMoments')">
						<image class="card-image" src="/static/avatar-default.png"></image>
						<text class="card-title">重要时刻</text>
					</view>
				</view>
			</view>

			<!-- 故事博物馆模块 -->
			<view class="module-section">
				<view class="module-header">
					<text class="module-title">生命故事博物馆</text>
					<text class="module-more">更多 ></text>
				</view>
				<view class="function-cards">
					<view class="function-card" @click="navigateTo('/pages/storylibrary/education')">
						<image class="card-image" src="/assets/education.png"></image>
						<text class="card-title">生命教育</text>
					</view>
					<view class="function-card" @click="navigateTo('/pages/storylibrary/storyCollection')">
						<image class="card-image" src="/static/avatar-default.png"></image>
						<text class="card-title">生命故事</text>
					</view>
					<view class="function-card" @click="navigateTo('/pages/storylibrary/activity')">
						<image class="card-image" src="/static/avatar-default.png"></image>
						<text class="card-title">公益活动</text>
					</view>
				</view>
			</view>

			<!-- 个人中心模块 -->
			<view class="module-section">
				<view class="module-header">
					<text class="module-title">个人中心</text>
					<text class="module-more">更多 ></text>
				</view>
				<view class="user-profile">
					<image class="profile-avatar" src="/static/avatar-default.png"></image>
					<view class="profile-info">
						<text class="profile-name">患者姓名</text>
						<text class="profile-status">已收集故事: 5 个</text>
					</view>
					<view class="profile-action" @click="navigateTo('/pages/patient/profile')">
						<text>查看资料</text>
					</view>
				</view>
			</view>
		</scroll-view>

		<!-- 底部导航栏 -->
		<tab-bar :current-tab="'/pages/patient/index'"></tab-bar>
	</view>
</template>

<script>
import TabBar from '@/components/TabBar.vue';

export default {
	components: {
		TabBar
	},
	data() {
		return {
			// 页面数据
		};
	},
	methods: {
		navigateTo(url) {
			uni.navigateTo({
				url: url
			});
		}
	}
};
</script>